"""
    父类与子类（继承）
"""
class Animal:
    def run(self):
        print('Animal is running...')
    def sleep(self):
        print('Animal is sleeping...')

class Dog(Animal):
    def run(self):
        print('Dog is running.')
    def bark(self):
        print('Dog is barking.')

dog=Dog()
dog.run()
dog.sleep()
dog.bark()